import ajax from '@/utils/request'
import { concatUrl } from '@/utils'

// 生成分享朋友圈的图片
export function generateFriendShareImage(data: object, fields: string | object = { fields: '*' }) {
    return ajax({
        url: concatUrl('/v1/goods/goods-distribution/generate-friend-share-image', fields),
        data
    })
}

// 生成朋友圈分享场景值
export function generateFriendShareScene(data) {
    return ajax({
        url: '/v1/goods/goods-distribution/generate-friend-share-scene',
        data,
    })
}

// 获取朋友圈分享分销信息 
export function getFriendShareScene(data: object, fields: string | object = { fields: 'text' }) {
    return ajax({
        url: concatUrl('/v1/goods/goods-distribution/get-friend-share-scene', fields),
        data
    })
}
